package ac.svn.accesscontrol.ui.helper.formatter;

import ac.svn.accesscontrol.store.SVNGroup;
import ac.svn.accesscontrol.ui.IListItemTextFormatter;

public class UserGroupItemNameFormatter implements IListItemTextFormatter {

	@Override
	public String formatString(Object msgObj) 
	{
		String formattedText = "";
		SVNGroup group = (SVNGroup) msgObj;
		formattedText = String.format("<HTML>%s [%d]</HTML>", group.getGroupName(),group.getGroupMembers().size());
		return formattedText;
	}

	@Override
	public String formatToolTip(Object msgObject) 
	{
		return formatString(msgObject);
	}

}
